<?php
	require_once 'mp3\Smarty.php';

	$smarty = new mp3_Smarty();
	
	session_start();
	require 'mp3/ComprovarSessio.php';
	
	echo $smarty->fetch('mp3\header.tpl');
	if (isset($_SESSION['userid'])){
		echo $smarty->fetch('mp3\cerca.tpl');
	} else {
		echo $smarty->fetch('mp3\index.tpl');
	}
	echo $smarty->fetch('mp3\footer.tpl');
?>